#!/bin/bash

## if any pid is alive return success

checkpid() {
    local i

    for i in $*; do
        [[ -d "/proc/$i" ]] && return 0
    done

    return 1
}

if checkpid 100; then
    echo "some alive"
else
    echo "not alive"
fi
